Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

168
Views
Uncaught Error: tensor3d() requires values to be number[][][] or flat/TypedArray

For tensorflow.js, I got 3 locations in formats:[location id, location x, location y]

input=[
['a',0,0],
['b',3,0],
['c',0,4]
]

I want shortest route distance to go through all locations, by creating permutations, then calculate each route total distance, then select shortest route would be c→a→b

output=['c','a','b']

But how to set location id as label?

const tfInput = tf.tensor3d(input)
const tfOutput = tf.tensor(output)
const model = tf.sequential();
model.add(tf.layers.dense({ units: 1, inputShape: [1,3,3] }))
Uncaught Error: tensor3d() requires values to be number[][][] or flat/TypedArray

Jsfiddle

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!